package com.edu.admin.entity;


import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;


import com.edu.admin.common.BaseEntity;

/**
 * 角色表实体
 * 
 * @author Wangjiong
 * 
 */
@Table(name = "sys_role")
public class SysRole extends BaseEntity{ 

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -1655147267571954221L;
	/**
	 * 角色id
	 * 
	 */
	@Id
	@GeneratedValue(generator = "JDBC")
	private Long roleId;
	/**
	 * 角色名称
	 * 
	 */
	@NotBlank(message = "角色名称不能为空")
	private String roleName;
	/**
	 * 角色层级
	 * 
	 */
	@Min(value = 1, message = "角色层级不能为空") 
	private Integer roleLevel;
	/**
	 * 是否使用
	 * 
	 */
	private Integer useType;
	/** 
	 * 菜单id数组
	 * 
	 */
	@Transient
    private Long[] menuIds;
	
	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public Integer getRoleLevel() {
		return roleLevel;
	}

	public void setRoleLevel(Integer roleLevel) {
		this.roleLevel = roleLevel;
	}

	public Integer getUseType() {
		return useType;
	}

	public void setUseType(Integer useType) {
		this.useType = useType;
	}

	public Long[] getMenuIds() {
		return menuIds;
	}

	public void setMenuIds(Long[] menuIds) {
		this.menuIds = menuIds;
	}

		

}
